/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Manager;

/**
 *
 * @author wienda
 */
import java.sql.*;

public class TestConnection {

    Connection conn;
    private Connection connection;
    private boolean ok;
    private String jdbcURL = "jdbc:oracle:thin:@localhost:1521:XE";
    private String user = "kasir";
    private String password = "sik";

    public Connection getConnection() {
        try {
            Class.forName("oracle.jdbc.driver.OracleDriver");
            connection = DriverManager.getConnection(jdbcURL, user, password);
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
        return connection;
    }

    public void setConn(Connection connection) {
        this.connection = connection;
    }
    public static void main(String[] args) {
        new TestConnection().getConnection();
    }
    
}

    
    
